package com.zl.csMall.product.commodity.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @description: 商品
 * @author: ChenNing
 * @date 2025-10-20 10:10
 */
@Data
@ApiModel(description = "商品 实体")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Commodity implements Serializable {

    private static final long serialVersionUID = 1L;

    private long id;

    @ApiModelProperty(value = "序号", required = true)
    @NotNull(message = "不能为空！")
    private Integer sort;

    @ApiModelProperty(value = "商品类型 枚举ID", required = true)
    @NotNull(message = "不能为空！")
    private Long typeEnumId;

    @ApiModelProperty(value = "编号", required = true)
    @NotNull(message = "不能为空！")
    @NotBlank(message = "不能为空！")
    private String number;

    @ApiModelProperty(value = "名称", required = true)
    @NotNull(message = "不能为空！")
    @NotBlank(message = "不能为空！")
    private String name;

    @ApiModelProperty(value = "成分", required = true)
    @NotNull(message = "不能为空！")
    @NotBlank(message = "不能为空！")
    private String ingredients;

    @ApiModelProperty(value = "幅宽", required = true)
    @NotNull(message = "不能为空！")
    @NotBlank(message = "不能为空！")
    private String fabricWidth;

    @ApiModelProperty(value = "克重", required = true)
    @NotNull(message = "不能为空！")
    @NotBlank(message = "不能为空！")
    private String gramWeight;

    @ApiModelProperty(value = "出米数", required = true)
    @NotNull(message = "不能为空！")
    @NotBlank(message = "不能为空！")
    private String riceOutput;

    @ApiModelProperty(value = "是否上架（1：是、2：否）", required = true)
    @NotNull(message = "不能为空！")
    private Integer isListed;

    @ApiModelProperty(value = "颜色类型")
    private Integer colorType;

    @ApiModelProperty(value = "json")
    private String colorList;

    @ApiModelProperty(value = "主图 附件ID")
    private Long mainAttachmentId;

    @ApiModelProperty(value = "主图 下载地址集合")
    @TableField(exist = false)
    private List<String> mainPicList;

    @ApiModelProperty(value = "正面图 附件ID")
    private Long frontAttachmentId;

    @ApiModelProperty(value = "正面图 下载地址集合")
    @TableField(exist = false)
    private List<String> frontPicList;

    @ApiModelProperty(value = "反面图 附件ID")
    private Long againstAttachmentId;

    @ApiModelProperty(value = "反面图 下载地址集合")
    @TableField(exist = false)
    private List<String> againstPicList;

    @ApiModelProperty(value = "特写图 附件ID")
    private Long featureAttachmentId;

    @ApiModelProperty(value = "特写图 下载地址集合")
    @TableField(exist = false)
    private List<String> featurePicList;

    @ApiModelProperty(value = "颜色图 附件ID")
    private Long colorAttachmentId;

    @ApiModelProperty(value = "颜色图 下载地址集合")
    @TableField(exist = false)
    private List<String> colorPicList;

    @ApiModelProperty(value = "详情图 附件ID")
    private Long infoAttachmentId;

    @ApiModelProperty(value = "详情图 下载地址集合")
    @TableField(exist = false)
    private List<String> infoPicList;

    @ApiModelProperty(value = "扩展图片1 附件ID")
    private Long exp1AttachmentId;

    @ApiModelProperty(value = "扩展图片1 下载地址集合")
    @TableField(exist = false)
    private List<String> exp1PicList;

    @ApiModelProperty(value = "扩展图片2 附件ID")
    private Long exp2AttachmentId;

    @ApiModelProperty(value = "扩展图片2 下载地址集合")
    @TableField(exist = false)
    private List<String> exp2PicList;

    @ApiModelProperty(value = "是否收藏（1：是、2：否）")
    @TableField(exist = false)
    private Integer isFavorites;

    private String remark;

    private Date createDate;

    private Date updateDate;

}
